home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00062_Script_PopUp Busca Drag < prev    next >
Text File  |  1999-03-19  |  22KB  |  659 lines

  1. property spr
  2. property spriteList, len -- Sprites a serem movidos juntos
  3. property editableList 
  4. property permiteIdle
  5. property ligado, escondido
  6. property animaSprite, animaPrim, animaUlt, animaTimer, animaVelocidade
  7. property memPrim, memUlt, memAtual
  8. property critico, estado
  9. property menu, menuItem, sprMenu
  10. property memoria, animaPrim2, animaUlt2
  11.  
  12. on getBehaviorDescription
  13.   return "Arrasta sprites com o mouse e anima"
  14. end
  15.  
  16. on getPropertyDescriptionList
  17.   set p_list = [ ¼
  18.     #spriteList: [ #comment:   "Lista de sprites a serem arrastados", ¼
  19.                     #format:   #list, ¼
  20.                    #default:    [0] ], ¼
  21.     #editableList: [ #comment: "Sprites editaveis que devem ser desligados antes de serem arrastados",¼
  22.                       #format: #list,¼
  23.                      #default:  [] ],¼
  24.     #permiteIdle: [ #comment:   "Permite funcionamento de outros sprites durante arraste", ¼
  25.                     #format:   #boolean, ¼
  26.                    #default:    false ], ¼
  27.     #animaSprite: [ #comment:  "Sprite sendo animado", ¼
  28.                     #format:   #integer, ¼
  29.                    #default:   0 ], ¼
  30.     #animaVelocidade: [ #comment:  "Tempo (em ticks) entre cada animacao", ¼
  31.                     #format:   #integer, ¼
  32.                    #default:   30 ], ¼
  33.     #animaPrim: [ #comment: "Primeiro membro da animacao",¼
  34.                       #format: #string,¼
  35.                      #default:  "" ],¼
  36.     #animaUlt: [ #comment:   "Ultimo membro da animacao", ¼
  37.                     #format:   #string, ¼
  38.                    #default:   "" ], ¼
  39.     #memoria: [ #comment:  "Limite de memoria pequena", ¼
  40.                     #format:   #integer, ¼
  41.                    #default:   0 ], ¼
  42.     #animaPrim2: [ #comment: "Primeiro membro da animacao (low mem)",¼
  43.                       #format: #string,¼
  44.                      #default:  "" ],¼
  45.     #animaUlt2: [ #comment:   "Ultimo membro da animacao (low mem)", ¼
  46.                     #format:   #string, ¼
  47.                    #default:   "" ] ¼
  48.   ]
  49.   return p_list
  50. end
  51.  
  52. -- Guarda count para acesso rapido
  53. on beginSprite me
  54.   global myMemSize
  55.   set spr = the spriteNum of me
  56.   put count(spriteList) into len
  57.   set ligado = true
  58.   if myMemSize > memoria * 1024 * 1024 then
  59.     set memPrim = the number of member animaPrim
  60.     set memUlt = the number of member animaUlt
  61.   else
  62.     set memPrim = the number of member animaPrim2
  63.     set memUlt = the number of member animaUlt2
  64.   end if
  65.   set memAtual = memPrim
  66.   puppetSprite animaSprite, true
  67.   set critico = false
  68.   set estado = 0
  69.   set menu = false
  70.   set menuItem = 0
  71.   set sprMenu = 107
  72.   set the visibility of sprite sprMenu to false
  73.   set the visibility of sprite sprMenu + 1 to false
  74. end
  75.  
  76. -- Esconde menu
  77. on chaveEsconde me, liga
  78.   if (liga = escondido) or not ligado then return
  79.   
  80.   set escondido = liga
  81.   if escondido then
  82.     chaveEditaveis me, false
  83.     chaveMenu me, false
  84.     puppetSprite 97, true
  85.     set m = the number of the member of sprite 97
  86.     set the member of sprite 97 to member (m+1)
  87.     set the visibility of sprite 98 to false
  88.     repeat with i = 1 to len
  89.       put getAt(spriteList,i) into s
  90.       if s < sprMenu and s <> spr and s <> 105 then
  91.         set the locV of sprite s to (the locV of sprite s) + 960
  92.       end if
  93.     end repeat    
  94.   else
  95.     
  96.     chaveEditaveis me, true
  97.     chaveMenu me, false
  98.     set m = the number of the member of sprite 97
  99.     set the member of sprite 97 to member (m-1)
  100.     repeat with i = 1 to len
  101.       put getAt(spriteList,i) into s
  102.       if s < sprMenu and s <> spr and s <> 105 then
  103.         set the locV of sprite s to (the locV of sprite s) - 960
  104.       end if
  105.     end repeat    
  106.     if estado = 0 then set the visibility of sprite 98 to true
  107.   end if
  108. end
  109.  
  110. -- Liga ou desliga sprites
  111. on chaveMenu me, liga
  112.   if liga = menu then return
  113.   
  114.   set menu = liga
  115.   set menuItem = 0
  116.   if menu then
  117.     set the visibility of sprite sprMenu to true
  118.     set the visibility of sprite 98 to false
  119.   else
  120.     set the visibility of sprite sprMenu to false
  121.     set the visibility of sprite sprMenu+1 to false
  122.     if estado = 0 and not escondido then set the visibility of sprite 98 to true
  123.   end if
  124. end
  125.  
  126. -- Liga ou desliga sprites
  127. on clicaMenu me
  128.   if menuItem = 0 then return
  129.   
  130.   set tmp = menuItem - 1
  131.   chaveMenu me, false
  132.   setEstado me, tmp
  133. end
  134.  
  135.  
  136. -- Liga ou desliga sprites
  137. on chaveVisibilidade me, liga
  138.   if liga = ligado then return
  139.   
  140.   if liga then
  141.     chaveEditaveis me, true
  142.     repeat with i = 1 to len
  143.       put getAt(spriteList,i) into s
  144.       set the locV of sprite s to (the locV of sprite s) - 960
  145.     end repeat    
  146.     if estado = 0 and not escondido then
  147.       set the visibility of sprite 98 to true
  148.     end if
  149.     set ligado = true
  150.     set animaTimer = the timer
  151.   else
  152.     chaveMenu me, false
  153.     chaveEditaveis me,false
  154.     repeat with i = 1 to len
  155.       put getAt(spriteList,i) into s
  156.       set the locV of sprite s to (the locV of sprite s) + 960
  157.     end repeat    
  158.     set the visibility of sprite 98 to false
  159.     set ligado = false
  160.   end if
  161. end
  162.  
  163. -- Desloca todos os componetes do popup
  164. on moveRelativo me, dx, dy
  165.   repeat with i = 1 to len
  166.     put getAt(spriteList,i) into s
  167.     set the locH of sprite s to (the locH of sprite s) + dx
  168.     set the locV of sprite s to (the locV of sprite s) + dy
  169.   end repeat
  170. end
  171.  
  172. -- Liga/desliga campos editaveis: recomenda-se update stage
  173. -- depois
  174. on chaveEditaveis me, liga
  175.   put count(editableList) into l
  176.   repeat with i=1 to l
  177.     set the editable of sprite getAt(the editableList of me,i) to liga
  178.   end repeat
  179. end
  180.  
  181. on mouseDown me
  182.   -- Verifica se esta em area sensivel para arraste
  183.   set mh = the mouseH - the locH of sprite spr
  184.   set mv = the mouseV - the locV of sprite spr
  185.   set mp = point(mh,mv)
  186.   
  187.   if inside(mp,rect(-87,-121,86,-107)) then
  188.     
  189.     -- Pega posicoes iniciais
  190.     put the mouseH into iniX
  191.     put the mouseV into iniY
  192.     
  193.     -- Desliga editaveis
  194.     chaveEditaveis me, false
  195.     if count(the editableList of me) > 0 then updateStage
  196.     
  197.     -- Loop enquanto pessoa segura mouse
  198.     repeat while the mouseDown
  199.       if the mouseV <> iniY or the mouseH <> iniX then
  200.         put the mouseV into mY
  201.         put the mouseH into mX
  202.         moveRelativo me, mX - iniX, mY - iniY
  203.         updateStage
  204.         put mY into iniY
  205.         put mX into iniX
  206.       end if
  207.       if permiteIdle then SendAllSprites(#IdleSprite)
  208.     end repeat
  209.     
  210.     -- Liga editaveis
  211.     chaveEditaveis me, true
  212.     if count(the editableList of me) > 0 then updateStage
  213.     
  214.   end if
  215. end
  216.  
  217. on mouseUp me
  218.   set mh = the mouseH - the locH of sprite spr
  219.   set mv = the mouseV - the locV of sprite spr
  220.   set mp = point(mh,mv)
  221.   
  222.   if inside(mp, rect(86,-121,102,-105)) then
  223.     -- Botao de esconde
  224.     puppetSound 2,"Esconde"
  225.     chaveEsconde me, not escondido
  226.     
  227.   else if inside(mp, rect(34, -117, 85, -108)) then
  228.     -- Botao de abrir submenu
  229.     puppetSound 2, "SomCliqueSimples"
  230.     chaveMenu me, not menu
  231.     updateStage
  232.     
  233.   else if inside(mp, rect(77,94,100,118)) then
  234.     -- Testa botao de incluir pagina atual
  235.     if testaPagina() then
  236.       global gPagSel
  237.       set m = the member of sprite 106
  238.       set the member of sprite 106 to member "CliquePagina1"
  239.       updateStage
  240.       set t = the timer
  241.       set pag = paginaAtual()
  242.       if getPos(gPagSel,pag) <= 0 then add gPagSel, pag
  243.       
  244.       if estado = 2 then
  245.         sendSprite(100,#listaSelecionados)
  246.         set the foreColor of member "PaginasSelecionadas" to ¼
  247.             (the backColor of member "FundoBranco") -- white
  248.         set the backColor of member "PaginasSelecionadas" to ¼
  249.             (the backColor of member "FundoPreto") -- black
  250.         sendSprite 104, #move, 0
  251.         updateStage
  252.       end if
  253.       
  254.       set the member of sprite 106 to m
  255.       updateStage
  256.     end if
  257.     
  258.   else if inside(mp, rect(-55, 72, -43, 88)) then
  259.     -- Testa se tem paginas a sair ou entrar nas selecionadas
  260.     global gPagSel
  261.     if estado <> 2 then
  262.       set m = the member of sprite 106
  263.       set the member of sprite 106 to member "CliquePagina1"
  264.       updateStage
  265.       set t = the timer
  266.       if the doubleClick and estado = 0 then
  267.         puppetSound 2,"CliqueInclui"
  268.         -- Adiciona todas paginas a lista de selecionadas
  269.         repeat with i = 1 to count(the intIndicePaginas of sprite 100)
  270.           set pag = getAt(the intIndicePaginas of sprite 100,i)
  271.           if getPos(gPagSel,pag) <= 0 then add gPagSel, pag
  272.         end repeat
  273.       else if the intPalavraClicada of sprite 100 <> 0 then
  274.         puppetSound 2,"CliqueInclui"
  275.         -- Adiciona pagina a lista de selecionadas
  276.         if estado = 0 then 
  277.           set pag = getAt(the intIndicePaginas of sprite 100,¼
  278.                         the intPalavraClicada of sprite 100)
  279.         else
  280.           set pag = Integer(item (the intPalavraClicada of sprite 100)¼
  281.                               of field "ListaAlfabeticaRef")
  282.         end if
  283.         
  284.         if getPos(gPagSel, pag) <= 0 then add gPagSel, pag
  285.         --
  286.       end if
  287.       repeat while the timer - t < 8
  288.       end repeat
  289.       set the member of sprite 106 to m
  290.       updateStage
  291.     else
  292.       set m = the member of sprite 106
  293.       set the member of sprite 106 to member "CliquePagina2"
  294.       set t = the timer
  295.       if the doubleClick then
  296.         puppetSOund 2,"CliqueExclui"
  297.         set gPagSel = []
  298.         sendSprite(100,#listaSelecionados)
  299.         set the foreColor of member "PaginasSelecionadas" to ¼
  300.             (the backColor of member "FundoBranco") -- white
  301.         set the backColor of member "PaginasSelecionadas" to ¼
  302.             (the backColor of member "FundoPreto") -- black
  303.         sendSprite 104, #move, 0
  304.         updateStage
  305.       else if the intPalavraClicada of sprite 100 <> 0 then
  306.         puppetSOund 2,"CliqueExclui"
  307.         -- Remover pagina da lista de selecionados
  308.         set pag = getAt(the intIndicePaginas of sprite 100,¼
  309.                         the intPalavraClicada of sprite 100)
  310.         deleteOne gPagSel, pag
  311.         sendSprite(100,#listaSelecionados)
  312.         set the foreColor of member "PaginasSelecionadas" to ¼
  313.             (the backColor of member "FundoBranco")-- white
  314.         set the backColor of member "PaginasSelecionadas" to ¼
  315.             (the backColor of member "FundoPreto")-- black
  316.         sendSprite 104, #move, 0
  317.         updateStage
  318.       end if
  319.       repeat while the timer - t < 8
  320.       end repeat
  321.       set the member of sprite 106 to m
  322.       updateStage
  323.     end if
  324.     -- Testa mudanca de estados
  325.   else if inside(mp,rect(-56,14,-38,35)) or inside(mp,rect(-87,55,-80,112)) then
  326.     setEstado me, 0
  327.   else if inside(mp, rect(-53,41,-39,55)) then
  328.     setEstado me, 1
  329.   else if inside(mp, rect(-73,86,-53,100)) or¼
  330.           inside(mp,rect(-57,59,-38,93)) then
  331.     setEstado me, 2
  332.   else
  333.     
  334.     global eMac
  335.     if estado = 1 then 
  336.       
  337.       -- Letras
  338.       if mv >= -105 and mv <= -92 and mh >= -34 and mh <= 96 then
  339.         set tmp = 0
  340.         -- a - n
  341.         if mh < - 21 then
  342.           set tmp = 1
  343.         else if mh < -13 then
  344.           if eMac then set tmp = 62
  345.           else set tmp = 63
  346.           
  347.         else if mh < -3 then
  348.           if eMac then set tmp = 128
  349.           else set tmp = 129
  350.           
  351.         else if mh < 5 then
  352.           if eMac then set tmp = 229
  353.           else set tmp = 231
  354.           
  355.         else if mh < 15 then
  356.           if eMac then set tmp = 301
  357.           else set tmp = 303
  358.           
  359.         else if mh < 23 then
  360.           if eMac then set tmp = 334
  361.           else set tmp = 336
  362.           
  363.         else if mh < 33 then
  364.           if eMac then set tmp = 371
  365.           else set tmp = 373
  366.           
  367.         else if mh < 42 then
  368.           if eMac then set tmp = 411
  369.           else set tmp = 414
  370.           
  371.         else if mh < 50 then
  372.           if eMac then set tmp = 463
  373.           else set tmp = 467
  374.           
  375.         else if mh < 57 then
  376.           if eMac then set tmp = 476
  377.           else set tmp = 480
  378.           
  379.         else if mh < 66 then
  380.           if eMac then set tmp = 552
  381.           else set tmp = 556
  382.           
  383.         else if mh < 73 then
  384.           if eMac then set tmp = 594
  385.           else set tmp = 599
  386.           
  387.         else if mh < 85 then
  388.           if eMac then set tmp = 629
  389.           else set tmp = 634
  390.           
  391.         else
  392.           if eMac then set tmp = 730
  393.           else set tmp = 736
  394.           
  395.         end if
  396.         
  397.       else if mv >= -90 and mv <= -78 and mh >= -34 and mh <= 83 then
  398.         -- o - z
  399.         if mh < -21 then
  400.           if eMac then set tmp = 761
  401.           else set tmp = 768
  402.         else if mh < -13 then
  403.           if eMac then set tmp = 774
  404.           else set tmp = 781
  405.         else if mh < -3 then
  406.           if eMac then set tmp = 820
  407.           else set tmp = 828
  408.         else if mh < 6 then
  409.           if eMac then set tmp = 824
  410.           else set tmp = 832
  411.         else if mh < 15 then
  412.           if eMac then set tmp = 882
  413.           else set tmp = 891
  414.         else if mh < 23 then
  415.           if eMac then set tmp = 1014
  416.           else set tmp = 1025
  417.         else if mh < 32 then
  418.           if eMac then set tmp = 1068
  419.           else set tmp = 1079
  420.         else if mh < 42 then
  421.           if eMac then set tmp = 1095
  422.           else set tmp = 1106
  423.         else if mh < 52 then
  424.           if eMac then set tmp = 1115
  425.           else set tmp = 1126
  426.         else if mh < 64 then
  427.           if eMac then set tmp = 1130
  428.           else set tmp = 1141
  429.         else if mh < 73 then
  430.           if eMac then set tmp = 1136
  431.           else set tmp = 1147
  432.         else if mh < 83 then
  433.           if eMac then set tmp = 1140
  434.           else set tmp = 1151
  435.         end if
  436.         
  437.       end if
  438.       
  439.       -- Faz scroll
  440.       if tmp <> 0 then sendSprite 100, #scrollLinha, tmp
  441.     end if
  442.   end if
  443. end
  444.  
  445. on idleSprite me
  446.   global gMustUpdate
  447.   
  448.   if menu then
  449.     if (not rollOver(sprMenu)) then
  450.       if (not rollOver(spr)) or ¼
  451.           (the mouseV - the locV of sprite spr) > -103 then
  452.         chaveMenu me, false
  453.       else if menuItem <> 0 then
  454.         set menuItem = 0
  455.         set the visibility of sprite sprMenu+1 to false
  456.         set gMustUpdate to true
  457.       end if
  458.       
  459.     else 
  460.       set tmp = ((the mouseV - the locV of sprite sprMenu) + 104) / 14
  461.       set tmp = tmp + 1
  462.       if tmp > 3 then set tmp = 3
  463.       else if tmp < 1 then set tmp = 1
  464.       if tmp <> menuItem then
  465.         set menuItem = tmp
  466.         puppetSprite sprMenu + 1, true
  467.         set the member of sprite sprMenu+1 to member (the number of member "BuscaMenuItens" + menuItem - 1)
  468.         set the visibility of sprite sprMenu + 1 to true
  469.         set gMustUpdate = true
  470.       end if
  471.     end if
  472.     
  473.   else if ligado and rollOver(spr) then
  474.     if the timer > animaTimer + animaVelocidade and memPrim <> memUlt then
  475.       -- Indica trecho critico (incrementando gCritico) e
  476.       -- marca localmente em <critico>
  477.       if not critico then
  478.         set critico = true
  479.         global gCritico
  480.         set gCritico = gCritico + 1
  481.       end if
  482.       -- set memAtual = memAtual + 1
  483.       -- if memAtual > memUlt then set memAtual = memPrim
  484.       set memAtual = random(memUlt - memPrim + 1) + memPrim + 1
  485.       set the member of sprite animaSprite to member memAtual
  486.       set gMustUpdate = true
  487.       set animaTimer = the timer
  488.     end if
  489.   else
  490.     -- Se nao esta animando, mas critico ainda estiver ligado,
  491.     -- desliga critico, e volta gCritico ao original
  492.     if critico then
  493.       global gCritico
  494.       set critico = false
  495.       set gCritico = gCritico -1
  496.     end if
  497.   end if
  498. end
  499.  
  500. on setEstado me, num
  501.   -- Testa se precisa mudar
  502.   if estado = num then return
  503.   
  504.   chaveMenu me, false
  505.   
  506.   -- Estado 1, lista alfabetica
  507.   if num = 2 then
  508.     if estado = 0 then
  509.       -- De 0 -> 2
  510.       -- Acerta/apaga sprites
  511.       puppetSprite spr, true
  512.       set tmp = the number of member "PopUpBuscaSelecionados"
  513.       if escondido then set tmp = tmp + 1
  514.       set the member of sprite 97 to member tmp
  515.       set the visibility of sprite 98 = false
  516.       set the visibility of sprite 99 = false
  517.       set the visibility of sprite 101 = false
  518.       set the visibility of sprite 102 = false
  519.       -- Barra de scroll
  520.       set the locV of sprite 103 to (the locV of sprite 103) - 104
  521.       set the height of sprite 103 to 198
  522.       -- Texto: lista alfabetica
  523.       set the visibility of sprite 100 to false
  524.       updateStage
  525.       sendSprite 100, #setMembro, "PaginasSelecionadas"
  526.       sendSprite(100,#listaSelecionados)
  527.       set the foreColor of member "PaginasSelecionadas" to ¼
  528.             (the backColor of member "FundoBranco") -- white
  529.       set the backColor of member "PaginasSelecionadas" to ¼
  530.             (the backColor of member "FundoPreto") -- black
  531.       set the locV of sprite 100 to (the locV of sprite 100) - 104
  532.       set the height of sprite 100 to 192
  533.       set the visibility of sprite 100 to true
  534.       sendSprite 104, #move, 0
  535.       updateStage
  536.       
  537.     else if estado = 1 then
  538.       -- De 1 -> 2
  539.       set tmp = the number of member "PopUpBuscaSelecionados"
  540.       if escondido then set tmp = tmp + 1
  541.       set the member of sprite 97 to member tmp
  542.       set the locV of sprite 103 to (the locV of sprite 103) - 30
  543.       set the height of sprite 103 to 198
  544.       set the visibility of sprite 100 to false
  545.       updateStage
  546.       sendSprite 100, #setMembro, "PaginasSelecionadas"
  547.       sendSprite(100,#listaSelecionados)
  548.       set the foreColor of member "PaginasSelecionadas" to ¼
  549.             (the backColor of member "FundoBranco") -- white
  550.       set the backColor of member "PaginasSelecionadas" to ¼
  551.             (the backColor of member "FundoPreto") -- black
  552.       set the locV of sprite 100 to (the locV of sprite 100) - 30
  553.       set the height of sprite 100 to 192
  554.       set the visibility of sprite 100 to true
  555.       sendSprite 104, #move, 0
  556.       updateStage  
  557.     end if
  558.     
  559.   else if num = 1 then
  560.     if estado = 0 then
  561.       -- De 0 -> 1
  562.       -- Acerta/apaga sprites
  563.       puppetSprite spr, true
  564.       set tmp = the number of member "PopUpBuscaAlfabetica"
  565.       if escondido then set tmp = tmp + 1
  566.       set the member of sprite 97 to member tmp
  567.       set the visibility of sprite 98 = false
  568.       set the visibility of sprite 99 = false
  569.       set the visibility of sprite 101 = false
  570.       set the visibility of sprite 102 = false
  571.       -- Barra de scroll
  572.       set the locV of sprite 103 to (the locV of sprite 103) - 74
  573.       set the height of sprite 103 to 168
  574.       -- Texto: lista alfabetica
  575.       set the visibility of sprite 100 to false
  576.       updateStage
  577.       sendSprite 100, #setMembro, "ListaAlfabetica"
  578.       sendSprite(100,#listaTodos)
  579.       set the locV of sprite 100 to (the locV of sprite 100) - 74
  580.       set the height of sprite 100 to 162
  581.       set the visibility of sprite 100 to true
  582.       sendSprite 104, #move, 0
  583.       updateStage
  584.       
  585.     else if estado = 2 then
  586.       -- De 2 -> 1
  587.       set tmp = the number of member "PopUpBuscaAlfabetica"
  588.       if escondido then set tmp = tmp + 1
  589.       set the member of sprite 97 to member tmp
  590.       set the locV of sprite 103 to (the locV of sprite 103) + 30
  591.       set the height of sprite 103 to 168
  592.       set the visibility of sprite 100 to false
  593.       updateStage
  594.       sendSprite 100, #setMembro, "ListaAlfabetica"
  595.       sendSprite(100,#listaTodos)
  596.       set the locV of sprite 100 to (the locV of sprite 100) + 30
  597.       set the height of sprite 100 to 162
  598.       set the visibility of sprite 100 to true
  599.       sendSprite 104, #move, 0
  600.       updateStage
  601.       
  602.     end if
  603.     
  604.     -- Estado 0, lista generica
  605.   else
  606.     if estado = 2 then
  607.       -- De 2 -> 0
  608.       -- Acerta/acende sprites
  609.       puppetSprite spr, true
  610.       set tmp = the number of member "PopUpBuscaGenerica"
  611.       if escondido then set tmp = tmp + 1
  612.       set the member of sprite 97 to member tmp
  613.       set the visibility of sprite 98 = true
  614.       set the visibility of sprite 99 = true
  615.       set the visibility of sprite 101 = true
  616.       set the visibility of sprite 102 = true
  617.       -- Barra de scroll
  618.       set the locV of sprite 103 to (the locV of sprite 103) + 104
  619.       set the height of sprite 103 to 94
  620.       -- Texto: lista alfabetica
  621.       set the visibility of sprite 100 to false
  622.       updateStage
  623.       sendSprite 100, #setMembro, "PaginasGenerico"
  624.       set the locV of sprite 100 to (the locV of sprite 100) + 104
  625.       set the height of sprite 100 to 88
  626.       set the visibility of sprite 100 to true
  627.       sendSprite 100, #zera
  628.       updateStage
  629.       
  630.       -- De 1 -> 0
  631.     else if estado = 1 then
  632.       set tmp = the number of member "PopUpBuscaGenerica"
  633.       if escondido then set tmp = tmp + 1
  634.       set the member of sprite spr to member tmp
  635.       set the visibility of sprite 98 to true
  636.       set the visibility of sprite 99 to true
  637.       set the visibility of sprite 101 to true
  638.       set the visibility of sprite 102 to true
  639.       -- Barra de scroll
  640.       set the locV of sprite 103 to (the locV of sprite 103) + 74
  641.       set the height of sprite 103 to 94
  642.       -- Texto
  643.       set the visibility of sprite 100 to false
  644.       updateStage
  645.       sendSprite 100, #setMembro, "PaginasGenerico"
  646.       set the locV of sprite 100 to (the locV of sprite 100) + 74
  647.       set the height of sprite 100 to 88
  648.       set the visibility of sprite 100 to true
  649.       sendSprite 100, #zera
  650.       updateStage
  651.     end if
  652.   end if
  653.   
  654.   -- Finalmente seta novo estado
  655.   set estado = num
  656.   
  657. end
  658.  
  659.